<template>
	<view>

	 <u-image width="100%" height="300rpx" :src="src" mode="widthFix" @click="open()"></u-image>
	
	</view>
</template>

<script>
	import jnpf from '@/common/js/jnpf.js'
	import banner from '@/pages/index/banner/banner.vue'
	import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue'
	
	export default {

		data() {
			return {
				src: 'http://180.166.193.6:90/images/study/pay1.jpg'
			}
		},
		onLoad(e) {
			this.isId = Object.prototype.hasOwnProperty.call(e, 'id');
			this.listId = e.id;
		},
		
		onReady(){
					uni.getSystemInfo({
						success: (res) => {
							let topHeight = 100;
							let winHeight = (res.windowHeight * (750/res.windowWidth));
							// boxHeight为屏幕高度 - 顶部高度
							this.boxHeight = winHeight - topHeight + 'rpx';
						}
					});
				},
		methods: {
			
			open() {
				    console.log('返回主界面')
					uni.showToast({
						title: '付款成功',
						duration: 3000
					});
								
					// uni.redirectTo({
					// 	url:'./3index',
						
					// })
				    
			      },
				  			
			submit() {
				//console.log('返回上一页成功');
				// 在某个事件或条件下触发返回上一页操作
				uni.navigateBack({
				    delta: 1, // 返回的页面数，如果是1表示返回上一级页面，可以根据需求调整
				    success: function() {
				        console.log('返回上一页成功');
				    },
				    fail: function(error) {
				        console.error('返回上一页失败', error);
				    }
				});

			},
			reset(e) {
				//console.log('清空数据')
			},
			
			// tab栏切换
			change(index) {
				this.swiperCurrent = index;
				
			},
			transition({ detail: { dx } }) {
				this.$refs.tabs.setDx(dx);
			},
			animationfinish({ detail: { current } }) {
				this.$refs.tabs.setFinishCurrent(current);
				this.swiperCurrent = current;
				this.current = current;
			}
		}
	}
</script>

<style>
	page {
		background-color: #f0f2f6;
	}
	
	.u-content {
			margin-top: 25rpx;
			color: $u-content-color;
			font-size: 48rpx;
			line-height: 1.8;
			
			// 标签形式无效
			p {
				color: $u-tips-color;
			}
		}
		
	.swiper-back {
		background: #3281FF !important;
		/* background: linear-gradient(to bottom, #4869EE 70%, #f0f2f6 30%) !important; */
		position: relative;
		height: calc(280rpx + 88rpx);
		margin-bottom: 80upx;
		
	}
</style>
